home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / CASE.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  58 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   CASE    .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB02.INC"
  22. COLOR 7, 0
  23. CLS
  24.  
  25. U$ = SPACE$(128)                                     ' default for code page
  26. FOR X% = 1 TO 128                                    ' stuff it with the 128
  27.   MID$( U$, X%, 1 ) = CHR$(X%+127)                   ' ASCII characters
  28. NEXT                                                 '
  29. L$ = U$                                              ' copy to LCASE
  30. REPLACE ANY "┌┬┐├┼┤└┴┘─│" WITH "╔╦╗╠╬╣╚╩╝═║" IN U$   ' ┌ = ╔ for UCASE
  31. REPLACE ANY "╔╦╗╠╬╣╚╩╝═║" WITH "┌┬┐├┼┤└┴┘─│" IN L$   ' ╔ = ┌ for LCASE
  32.                                                      '
  33. SetUPPERcase U$                                      ' send the new UCASE$
  34. SetLOWERcase L$                                      ' send the new LCASE$
  35.                                                      '
  36. T$ = "┌────────┬────────┐"                           ' our "text" strings
  37. M$ = "├────────┼────────┤"                           '
  38. B$ = "└────────┴────────┘"                           '
  39.                                                      '
  40.               PRINT T$                               ' control box
  41.               PRINT M$                               '
  42.               PRINT B$                               '
  43. PRINT                                                '
  44. UCASEstr T$ : PRINT T$                               ' ucase the strings
  45. UCASEstr M$ : PRINT M$                               '   and print the new
  46. UCASEstr B$ : PRINT B$                               '   values
  47. PRINT                                                '
  48.               PRINT fLCASE$( T$ )                    ' call the function to
  49.               PRINT fLCASE$( M$ )                    '   print the LCASE
  50.               PRINT fLCASE$( B$ )                    '   values
  51. PRINT                                                '
  52.                                                      '
  53. V$ = "notice that the English characters are " +_    ' for chars < 128 the
  54.      "also correctly translated."                    ' translations are also
  55. UCASEstr V$  : PRINT V$                              ' done correctly
  56.                PRINT fLCASE$( V$ )                   '
  57.  
  58.